<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gbk">
		<link href="css/style.css" rel="stylesheet" type="text/css">
		<title>维护供货商主表</title>
		<script type="text/javascript">
			var link;
			function suppMod( link ) {
				var d = document.forms[0];
				d.action = link;
				d.submit();
			}

			function suppDel( link ) {
				if (window.confirm("确认删除吗？")) {
					var d = document.forms[0];
					d.action = link;
					d.submit();
				} else {

				}
			}
		</script>
	</head>

	<body>
		<center>
			<h2>
				维护供应商
			</h2>
		</center>
		<div align="center">
			<form action="#" method="post">
				<table border="1" width="80%">
					<tr>
						<th>编号</th>
						<th>供应商</th>
						<th>地址</th>
						<th>邮政编码</th>
						<th>电话</th>
						<th>传真</th>
						<th>联系人</th>
						<th>联系人电话</th>
						<th>联系人E-mail</th>
						<th>开户银行</th>
						<th>维护</th>

					</tr>
					<s:iterator value="#request.suppList" id="supp">
						<tr>
							<td>
								<s:property value="#supp.id" />
							</td>
							<td>
								<s:property value="#supp.shortName" />
							</td>
							<td>
								<s:property value="#supp.address" />
							</td>
							<td>
								<s:property value="#supp.pc" />
							</td>
							<td>
								<s:property value="#supp.tel" />
							</td>
							<td>
								<s:property value="#supp.fax" />
							</td>
							<td>
								<s:property value="#supp.linkmanName" />
							</td>
							<td>
								<s:property value="#supp.linkmanTel" />
							</td>
							<td>
								<s:property value="#supp.linkmanEmail" />
							</td>
							<td>
								<s:property value="#supp.bank" />
							</td>

							<td>
								<input type="button" value="修改" name="update" 	onclick="suppMod('prepareModSupp?suppId=<s:property value="#supp.id" />')" />

								<input type="button" value="删除" name="delete" onclick="suppDel('deleteSupp?suppId=<s:property value="#supp.id" />')" />
							</td>
						</tr>
					</s:iterator>
				</table>
			</form>

			<br/>
			<a href="prepareAddBuyInMain.action">新增</a>

		</div>
	</body>
</html>